package com.java.day02;

import java.util.Random;
public class RandomDemo {
    public static void main(String[] args) {
        //1. 创建随机数对象
        Random random = new Random();
        //2. 调用对象的方法
        int i = random.nextInt(30);  // [0,30)
        System.out.println(i);
    }
}
